﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="editRole.aspx.cs" Inherits="NCC_SOP.Admin.AdministratorOnly.WebForm3" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
 <style type="text/css">
        .required
        {
            color: Red;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<asp:MultiView ID="MultiView1" runat="server">
<asp:View ID="View1" runat="server">
 <table>
        <tr>
            <td colspan="2">
                Role Name:
            </td>
            <td>
                <asp:TextBox ID="RoleNameBox" runat="server"></asp:TextBox>
            </td>
        </tr>
         <tr>
        <td colspan="2">
            Users to be assigned:
        </td>
        <td>
            <asp:CheckBoxList ID="Users" runat="server"></asp:CheckBoxList>
        </td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:RequiredFieldValidator ID="RoleNameValidator" ValidationGroup="EditRole" CssClass="required" ControlToValidate="RoleNameBox"
                    ErrorMessage="Please enter a role name." runat="server"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td colspan="3" align="right">
                <asp:Button ID="UpdateButton" Text="Update" OnClick="UpdateRole" ValidationGroup="EditRole" runat="server" />
                <asp:Button ID="CancelButton" Text="Cancel" OnClick="RedirectToManageRoles" runat="server" CausesValidation="false" />
            </td>
        </tr>
    </table>
</asp:View>

<asp:View ID="View2" runat="server">
<table>

<tr>
You have successfully edited the role.
</tr>
<tr>
<asp:LinkButton ID="ToManageRole" runat="server" OnClick="RedirectToManageRoles" Text="Click here to go back to Manage Roles."></asp:LinkButton>
</tr></table>
</asp:View></asp:MultiView>
   
</asp:Content>
